<?php

namespace app\api\controller;
use app\api\logic\Vip1688Logic;
use  app\common\controller\DBase;
class Vip1688 extends DBase
{

    /**
     * @desc   跨境场景下将商品加入铺货列表
     * @author luckyXiong
     * @date   2025-02-06
     */
    public function publish_product(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->publish_product($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取1688某个产品的sku信息
     * @author luckyXiong
     * @date   2025-02-06
     */
    public function get_product_info(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->get_product_info($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取仓库产品信息接口
     * @author luckyXiong
     * @date   2025-02-06
     */
    public function get_skus_info(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->get_skus_info($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   手动指定绑定关系
     * @author luckyXiong
     * @date   2025-02-28
     */
    public function bind_sku_1688(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->bind_sku_1688($params);
        return $this->jsonMessage(200, true, "操作成功!", '');
    }



    /**
     * @desc   1688创建采购单接口
     * @author luckyXiong
     * @date   2025-02-08
     */
    public function createOrder(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->createOrder($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }



    /**
     * @desc   1688订单取消接口
     * @author luckyXiong
     * @date   2025-01-10
     */
    public function cancelOrder(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->cancelOrder($params);
        return $this->jsonMessage(200, true, "操作成功!", null);
    }



    /**
     * @desc   获取旺旺聊天url
     * @author luckyXiong
     * @date   2025-02-28
     */
    public function get_wangwang_url(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->get_wangwang_url($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取订单物流信息
     * @author luckyXiong
     * @date   2025-02-28
     */
    public function get_logistics(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->get_logistics($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   获取订单物流轨迹
     * @author luckyXiong
     * @date   2025-02-28
     */
    public function get_logistics_list(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->get_logistics_list($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   指定配对关系
     * @author luckyXiong
     * @date   2025-03-03
     */
    public function change_pair(){
        $params = $this->request->post();
        $res    = (new Vip1688Logic())->change_pair($params);
        return $this->jsonMessage(200, true, "操作成功!", $res);
    }


    /**
     * @desc   删除产品接口
     * @author luckyXiong
     * @date   2025-03-03
     */
    public function delete_1688(){
        $params = $this->request->post();
        (new Vip1688Logic())->delete_1688($params);
        return $this->jsonMessage(200, true, "操作成功!", '');
    }


    /**
     * @desc   更换配对关系
     * @author luckyXiong
     * @date   2025-03-03
     */
    public function update_1688(){
        $params = $this->request->post();
        (new Vip1688Logic())->update_1688($params);
        return $this->jsonMessage(200, true, "操作成功!", '');
    }


    /**
     * @desc   解除配对关系
     * @author luckyXiong
     * @date   2025-03-03
     */
    public function release_1688(){
        $params = $this->request->post();
        (new Vip1688Logic())->release_1688($params);
        return $this->jsonMessage(200, true, "操作成功!", '');
    }














}